package controllers;

import java.util.HashMap;
import java.util.Map;

import data.IStudentDAO;
import data.StudentDAO;
import spark.Request;
import spark.Response;

public class StudentController extends BaseController {
	private IStudentDAO dao;
	public StudentController(Request request, Response response) {
		super(request, response);
		dao = new StudentDAO();
	}
	
	public Object view(){
		Map<String, Object> attributes = new HashMap<>();
		attributes.put("student", dao.get(this.getCredentials().getPersonId()));
		return render(attributes, "student/view.html");
	}

}
